package com.coolwen.spring.speciality.model;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;

/**
 * @author CoolWen
 * @version 2020-04-09 9:12
 */
@Component
public class Student {


    @Value("#{systemProperties['user.name']}")
    private String name;
    private List<Book> books;

    public Student(List<Book> books) {
        this.books = Arrays.asList(new Book("b1", 12),
                new Book("b2", 13),
                new Book("b3", 10)
        );
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }
}
